from urllib.request import Request, urlopen
import simplejson
import ssl

imageUrl = 'https://www.12306.cn/index/'
ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 ' \
     'Safari/537.36 '

req = Request(imageUrl, headers={
    'User-agent': ua

}, method='GET')
with urlopen(req) as res:
    print(res.read().decode())
